package demo.validate;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.hissy.common.validate.ValidateUtils;

/**
 * Created by zhangyanfei on 2017/10/30.
 *
 * @author zhangyanfei
 * @date 2017/10/30
 */
public class validate {
    private static Student getBean() {
        Student bean = new Student();
        bean.setName(null);
        bean.setAddress("北京");
        bean.setBirthday(new Date());
        bean.setFriendName(null);
        bean.setWeight(new BigDecimal(30));
        bean.setEmail("xiaogangfan163.com");
        return bean;
    }

    public static void main(String[] args) {
        Student student = getBean();
        List<String> validate = ValidateUtils.validate(student);
        validate.forEach(System.out::println);
    }
}
